<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
<title>source\jindo.Clipboard.js - Jindo Component - AjaxUI@NHN</title>
<link rel="stylesheet" type="text/css" href="../assets/prettify/prettify-min.css" media="screen">
<script type="text/javascript">
	var isMobile = (function() {
		var r = window.devicePixelRatio || 1;
		if (/windows phone/i.test(navigator.userAgent)) { r = 2; }
		
		var s = Math.max(screen.width / r, screen.height / r);
		
		var m = s < 1024;
		var href = m ? "api.mobile.css" : "api.css";
		document.write('<link rel="stylesheet" type="text/css" href="../assets/' + href + '" media="screen">');
		
		return m;
	})();
</script>

<script type="text/javascript" src="../assets/jindo.desktop.min.js"></script>
<script type="text/javascript" src="../assets/jindo_component.min.js"></script>
</head>
<body class="api-page">
<div id="wrap" class="api-main"><!-- 2Depth 접기 : lft_fold 추가 -->

	<div id="header">
		<h1><a href="../index.html"><span class="blind">JindoJS</span></a></h1>
		<div class="info">
			<span class="version">version 1.6.0</span>
			<span class="bar">|</span>
			<span class="help"><span class="ic_help"></span><a href="http://devcode.nhncorp.com/projects/jindo-component/issue" target="_blank">버그신고/문의</a></span>
		</div>
		<div class="menu">
			<button type="button" id="toggle_search_btn" class="btn_sch"><span class="blind">검색</span></button>
			<button type="button" id="toggle_list_btn" class="btn_snb btn_snb_on"><span class="blind">메뉴</span></button>
			<!-- [D] 클릭시 btn_sch_on,btn_snb_on 추가 -->
		</div>
	</div>

	<!-- sch_frm -->
	<div class="sch_frm hide_when_small">
		<h2 class="blind">검색</h2>
		<div class="filter">
			<input type="search" id="api-filter" placeholder="검색어를 입력하세요.">
		</div>
		<div id="search-tab" style="display:none;">
			<ul class="tabs">
			<li class="tc-tab">전체</li>
			<li class="tc-tab">키워드</li>
			<li class="tc-tab">클래스</li>
			<li class="tc-tab">메서드</li>
			<li class="tc-tab">프로퍼티</li>
			<li class="tc-tab">이벤트</li>
			</ul>
			<div class="panels">
				<ul id="api-all" class="tc-panel"></ul>
				<ul id="api-keywords" class="tc-panel"></ul>
				<ul id="api-classes" class="tc-panel"></ul>
				<ul id="api-methods" class="tc-panel"></ul>
				<ul id="api-attrs" class="tc-panel"></ul>
				<ul id="api-events" class="tc-panel"></ul>
			</div>

		</div>
	</div>
	<!-- // sch_frm -->

	<!-- container -->
	<div id="container">
		<!-- left-columns -->
		<div id="left-columns" class="sidemenu has_scrollbar">
			<h2 class="blind"><a href="../index.html"><span>APIs</span></a></h2>
<div class="snb depth1 scrollbar hide_when_small">
	<!-- [D] style="width:135px; height:384px; -->
	<div class="scrollbar-box">
		<div class="scrollbar-content">
			<div><ul>
			            <li class="">
			            	<a href="../classes/jindo.Accordion.html" class="">
			                	Accordion
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.AjaxHistory.html" class="">
			                	AjaxHistory
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.BrowseButton.html" class="">
			                	BrowseButton
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Cache.html" class="">
			                	Cache
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Calendar.html" class="">
			                	Calendar
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Canvas.html" class="">
			                	Canvas
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.CheckBox.html" class="">
			                	CheckBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.CircularRolling.html" class="">
			                	CircularRolling
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Clipboard.html" class="">
			                	Clipboard
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Component.html" class="">
			                	Component
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DataBridge.html" class="">
			                	DataBridge
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DatePicker.html" class="">
			                	DatePicker
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DefaultTextValue.html" class="">
			                	DefaultTextValue
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Dialog.html" class="">
			                	Dialog
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DragArea.html" class="">
			                	DragArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DropArea.html" class="">
			                	DropArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.DynamicTree.html" class="">
			                	DynamicTree
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Effect.html" class="">
			                	Effect
								
								

							    
						        
						            <span class="flag static" title="static"><span class="blind">static</span></span>
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.FileUploader.html" class="">
			                	FileUploader
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.FloatingLayer.html" class="">
			                	FloatingLayer
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Foggy.html" class="">
			                	Foggy
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Formatter.html" class="">
			                	Formatter
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.HTMLComponent.html" class="">
			                	HTMLComponent
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.InlineTextEdit.html" class="">
			                	InlineTextEdit
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerEffect.html" class="">
			                	LayerEffect
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerManager.html" class="">
			                	LayerManager
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LayerPosition.html" class="">
			                	LayerPosition
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.LazyLoading.html" class="">
			                	LazyLoading
								
								

							    
						        
						            <span class="flag static" title="static"><span class="blind">static</span></span>
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ModalDialog.html" class="">
			                	ModalDialog
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.MouseGesture.html" class="">
			                	MouseGesture
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.MultipleAjaxRequest.html" class="">
			                	MultipleAjaxRequest
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.NumberFormatter.html" class="">
			                	NumberFormatter
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.NumericStepper.html" class="">
			                	NumericStepper
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Pagination.html" class="">
			                	Pagination
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Rolling.html" class="">
			                	Rolling
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RollingChart.html" class="">
			                	RollingChart
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RolloverArea.html" class="">
			                	RolloverArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.RolloverClick.html" class="">
			                	RolloverClick
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ScrollBar.html" class="">
			                	ScrollBar
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.ScrollBox.html" class="">
			                	ScrollBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.SelectArea.html" class="">
			                	SelectArea
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.SelectBox.html" class="">
			                	SelectBox
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Slider.html" class="">
			                	Slider
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.StarRating.html" class="">
			                	StarRating
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.TabControl.html" class="">
			                	TabControl
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.TextRange.html" class="">
			                	TextRange
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Timer.html" class="">
			                	Timer
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Transition.html" class="">
			                	Transition
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.Tree.html" class="">
			                	Tree
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.UIComponent.html" class="">
			                	UIComponent
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.UploadQueue.html" class="">
			                	UploadQueue
								
								

							    
						        
			            	</a>
			            </li>
			        
			            <li class="">
			            	<a href="../classes/jindo.WatchInput.html" class="">
			                	WatchInput
								
								

							    
						        
			            	</a>
			            </li>
			        </ul></div>
		</div>
	</div>
	<div class="scrollbar-v">
		<div class="scrollbar-button-up"></div>
		<div class="scrollbar-track">
			<div class="scrollbar-thumb" style="top: 0px; height: 222px; "></div>
		</div>
		<div class="scrollbar-button-down"></div>
	</div>
</div>


<button type="button" title="펼치기" class="btn_open">바로가기 열기<span class="ic"></span></button>
<button type="button" title="접기" class="btn_close">바로가기 닫기<span class="ic"></span></button>

		</div>
		<!-- // left-columns -->

		<!-- main content -->
		<div id="main">
			<div class="main_fix">
				<div class="content">
	
	<h1 class="blind">source/jindo.Clipboard.js</h1>
	<div class="tc-panel first">
		<dl class="relation">
			<dt>파일명</dt>
			<dd>jindo.Clipboard.js</dd>
			<dt>경로</dt>
			<dd>source/</dd>
		</dl>
		<div id="file" class="file">
		    <pre class="code prettyprint linenums">/**
	@fileOverview&nbsp;클립보드를&nbsp;컨트롤하는&nbsp;컴포넌트
	@author&nbsp;hooriza,&nbsp;modified&nbsp;by&nbsp;senxation
	@version&nbsp;#__VERSION__#
**/

/**
	플래시&nbsp;객체를&nbsp;사용하여&nbsp;시스템&nbsp;클립보드에&nbsp;값을&nbsp;설정하는&nbsp;컴포넌트이다.
	플래시로드를&nbsp;위해&nbsp;flashObject.js&nbsp;파일을&nbsp;사용한다.
	
	@class&nbsp;jindo.Clipboard
	@extends&nbsp;jindo.Component
	
	@refer&nbsp;http://devcafe.nhncorp.com/flashdev/board_6/60932&nbsp;flashObject.js&nbsp;에&nbsp;대하여&nbsp;
	@refer&nbsp;http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes.html&nbsp;Understanding&nbsp;the&nbsp;security&nbsp;changes&nbsp;in&nbsp;Flash&nbsp;Player&nbsp;10
	@refer&nbsp;http://www.adobe.com/devnet/flashplayer/articles/fplayer10_uia_requirements.html&nbsp;User-initiated&nbsp;action&nbsp;requirements&nbsp;in&nbsp;Flash&nbsp;Player&nbsp;10
	
	@keyword&nbsp;clipboard,&nbsp;클립보드,&nbsp;flash
**/
jindo.Clipboard&nbsp;=&nbsp;jindo.$Class({
	/**&nbsp;@lends&nbsp;jindo.Clipboard.prototype&nbsp;*/
	_aElement&nbsp;:&nbsp;null,
	_aData&nbsp;:&nbsp;null,
	_elOvered&nbsp;:&nbsp;null,
	_bFailed&nbsp;:&nbsp;true,
	
	/**
		@constructor
		
		@param&nbsp;{String}&nbsp;sFlashURL&nbsp;클립보드를&nbsp;제어할&nbsp;플래시파일&nbsp;주소
		@example
			&lt;span&nbsp;id=&quot;foo&quot;&gt;클립보드에&nbsp;&quot;http://naver.com/&quot;&nbsp;복사하기&lt;/span&gt;
			&lt;script&gt;
				oClipboard&nbsp;=&nbsp;new&nbsp;jindo.Clipboard(&#39;../Sources/clipboard.swf&#39;).attach({
					load&nbsp;:&nbsp;function(oCustomEvent)&nbsp;{
						//클립보드&nbsp;제어를&nbsp;위한&nbsp;Flash&nbsp;파일이&nbsp;로드&nbsp;완료된&nbsp;이후에&nbsp;발생
						this.setData(jindo.$(&#39;foo&#39;),&nbsp;&#39;http://naver.com/&#39;);
						this.setData(jindo.$(&#39;bar&#39;),&nbsp;&#39;http://daum.net/&#39;);
					},
					copy:&nbsp;function(oCustomEvent){
						//마우스&nbsp;클릭시&nbsp;성공적으로&nbsp;클립보드가&nbsp;설정된&nbsp;경우&nbsp;발생
						alert(e.element&nbsp;+&nbsp;&#39;&nbsp;를&nbsp;눌러서&nbsp;&#39;&nbsp;+&nbsp;e.data&nbsp;+&nbsp;&#39;&nbsp;가&nbsp;클립보드에&nbsp;저장되었습니다&#39;);
					},
					failure:&nbsp;function(oCustomEvent){
						//마우스&nbsp;클릭시&nbsp;클립보드&nbsp;설정에&nbsp;실패한&nbsp;경우&nbsp;발생
						alert(&#39;실패&nbsp;:&nbsp;&#39;&nbsp;+&nbsp;e.element&nbsp;+&nbsp;&#39;&nbsp;를&nbsp;눌렀지만&nbsp;&#39;&nbsp;+&nbsp;e.data&nbsp;+&nbsp;&#39;&nbsp;를&nbsp;클립보드에&nbsp;저장하지&nbsp;못했습니다&#39;);
					},
					over&nbsp;:&nbsp;function(oCustomEvent){
					},
					out&nbsp;:&nbsp;function(oCustomEvent){
					},
					down&nbsp;:&nbsp;function(oCustomEvent){
					},
					up&nbsp;:&nbsp;function(oCustomEvent){
					}
				});
			&lt;/script&gt;
	**/
	$init&nbsp;:&nbsp;function(sFlashURL)&nbsp;{
		this._sFlashURL&nbsp;=&nbsp;sFlashURL;
		var&nbsp;oStatic&nbsp;=&nbsp;jindo.Clipboard;&nbsp;//구버전&nbsp;진도&nbsp;(0.3.5&nbsp;이하)&nbsp;jindo.$Class에는&nbsp;constructor프로퍼티가&nbsp;존재하지&nbsp;않음
		var&nbsp;sFlashUID&nbsp;=&nbsp;this._sUnique&nbsp;=&nbsp;&#39;S&#39;&nbsp;+&nbsp;new&nbsp;Date().getTime()&nbsp;+&nbsp;parseInt(Math.random()&nbsp;*&nbsp;1000000000,&nbsp;10);
		
		if&nbsp;(typeof&nbsp;oStatic._callbacks&nbsp;==&nbsp;&quot;undefined&quot;)&nbsp;{
			oStatic._callbacks&nbsp;=&nbsp;{};
		}
		oStatic._callbacks[this._sUnique]&nbsp;=&nbsp;{
			click&nbsp;:&nbsp;jindo.$Fn(this._onFlashClick,&nbsp;this).bind(),
			mouseover&nbsp;:&nbsp;jindo.$Fn(this._onFlashMouseOver,&nbsp;this).bind(),
			mouseout&nbsp;:&nbsp;jindo.$Fn(this._onFlashMouseOut,&nbsp;this).bind(),
			mousedown&nbsp;:&nbsp;jindo.$Fn(this._onFlashMouseDown,&nbsp;this).bind(),
			mouseup&nbsp;:&nbsp;jindo.$Fn(this._onFlashMouseUp,&nbsp;this).bind(),
			load&nbsp;:&nbsp;jindo.$Fn(this._onFlashLoad,&nbsp;this).bind()
		};
		
		this._aElement&nbsp;=&nbsp;[];
		this._aData&nbsp;=&nbsp;[];
		this._agent&nbsp;=&nbsp;jindo.$Agent();
		
		this._initFlash();
		
		this._wfHandler&nbsp;=&nbsp;jindo.$Fn(function(we)&nbsp;{
			this._initFlash();
			var&nbsp;el&nbsp;=&nbsp;we.element;
			var&nbsp;htPosition&nbsp;=&nbsp;jindo.$Element(el).offset();
			this._setFlashPosSize(htPosition.left,&nbsp;htPosition.top,&nbsp;el.offsetWidth,&nbsp;el.offsetHeight);
			this._setClipboard(el,&nbsp;this._getData(el));
			this._elOvered&nbsp;=&nbsp;el;
		},&nbsp;this);
		
	},
	
	_initFlash&nbsp;:&nbsp;function()&nbsp;{
		if&nbsp;(this._elDummy)&nbsp;{
			return;
		}
		var&nbsp;elDummy&nbsp;=&nbsp;this._elDummy&nbsp;=&nbsp;jindo.$(&#39;&lt;div&gt;&#39;);
		var&nbsp;sFlashUID&nbsp;=&nbsp;this._sUnique;
		
		elDummy.style.cssText&nbsp;=&nbsp;&#39;position:absolute&nbsp;!important;&nbsp;border:0&nbsp;!important;&nbsp;padding:0&nbsp;!important;&nbsp;margin:0&nbsp;!important;&nbsp;overflow:visible&nbsp;!important;&nbsp;z-index:32000&nbsp;!important;&#39;;
		document.body.insertBefore(elDummy,&nbsp;document.body.firstChild);
		
		if(this._agent.flash().version&nbsp;&gt;=&nbsp;11&amp;&amp;this._agent.navigator().ie){
			this._sFlashURL&nbsp;+=&nbsp;&quot;?&quot;+Math.floor(Math.random()&nbsp;*&nbsp;10000);
		}
		
		var&nbsp;sFlashHtml&nbsp;=&nbsp;nhn.FlashObject.generateTag(this._sFlashURL,&nbsp;&#39;CLIPBOARD&#39;&nbsp;+&nbsp;sFlashUID,&nbsp;1,&nbsp;1,&nbsp;{flashVars&nbsp;:&nbsp;{&nbsp;sUniq&nbsp;:&nbsp;sFlashUID&nbsp;},&nbsp;wmode&nbsp;:&nbsp;&#39;transparent&#39;});&nbsp;//flashVars로&nbsp;sUniq&nbsp;전달
		sFlashHtml&nbsp;=&nbsp;sFlashHtml.replace(/style=&quot;position:relative&nbsp;!important;&quot;/gi,&nbsp;&#39;style=&quot;position:absolute&nbsp;!important;&nbsp;left:0&nbsp;!important;&nbsp;top:0&nbsp;!important;&nbsp;border:0&nbsp;!important;&nbsp;padding:0&nbsp;!important;&nbsp;margin:0&nbsp;!important;&nbsp;overflow:visible&nbsp;!important;&quot;&#39;);
		elDummy.innerHTML&nbsp;=&nbsp;sFlashHtml;
		jindo.$Fn(this._checkFailed,&nbsp;this).attach(elDummy,&nbsp;&#39;click&#39;);
	},
	
	_getFlash&nbsp;:&nbsp;function()&nbsp;{
		return&nbsp;nhn.FlashObject.find(&#39;CLIPBOARD&#39;&nbsp;+&nbsp;this._sUnique);
	},
	
	_setFlashPosSize&nbsp;:&nbsp;function(nLeft,&nbsp;nTop,&nbsp;nWidth,&nbsp;nHeight)&nbsp;{
		var&nbsp;elDummy&nbsp;=&nbsp;this._elDummy;
		elDummy.style.left&nbsp;=&nbsp;nLeft&nbsp;+&nbsp;&#39;px&#39;;
		elDummy.style.top&nbsp;=&nbsp;nTop&nbsp;+&nbsp;&#39;px&#39;;
		
		var&nbsp;oFlash&nbsp;=&nbsp;this._getFlash();
		oFlash.width&nbsp;=&nbsp;nWidth;
		oFlash.height&nbsp;=&nbsp;nHeight;
		oFlash.style.width&nbsp;=&nbsp;nWidth&nbsp;+&nbsp;&#39;px&#39;;
		oFlash.style.height&nbsp;=&nbsp;nHeight&nbsp;+&nbsp;&#39;px&#39;;
	},
	
	/**
		특정&nbsp;엘리먼트를&nbsp;클릭하면&nbsp;지정된&nbsp;값을&nbsp;클립보드에&nbsp;저장하도록&nbsp;설정한다.
		
		@method&nbsp;setData
		@remark&nbsp;setData메서드는&nbsp;반드시&nbsp;Flash&nbsp;객체의&nbsp;로드가&nbsp;완료된&nbsp;이후에&nbsp;수행되어야한다.&nbsp;load&nbsp;커스텀&nbsp;이벤트핸들러&nbsp;내에서&nbsp;수행하는&nbsp;것을&nbsp;권장한다.
		@param&nbsp;{HTMLElement&nbsp;|&nbsp;String}&nbsp;el&nbsp;지정할&nbsp;엘리먼트&nbsp;혹은&nbsp;id
		@param&nbsp;{String}&nbsp;sData&nbsp;저장할&nbsp;값.&nbsp;빈&nbsp;값(null&nbsp;또는&nbsp;&quot;&quot;&nbsp;또는&nbsp;false)이면&nbsp;설정된&nbsp;값을&nbsp;해제한다.
		@example
			oClipboard.attach({
				load&nbsp;:&nbsp;function(e)&nbsp;{
					//클립보드&nbsp;제어를&nbsp;위한&nbsp;Flash&nbsp;파일이&nbsp;로드&nbsp;완료된&nbsp;이후에&nbsp;발생
					this.setData(jindo.$(&#39;foo&#39;),&nbsp;&#39;http://naver.com/&#39;);
					this.setData(jindo.$(&#39;bar&#39;),&nbsp;&#39;http://daum.net/&#39;);
				}
			});
	**/
	setData&nbsp;:&nbsp;function(el,&nbsp;sData)&nbsp;{
		el&nbsp;=&nbsp;jindo.$(el);
		
		var&nbsp;nIndex&nbsp;=&nbsp;jindo.$A(this._aElement).indexOf(el),
			bExist&nbsp;=&nbsp;nIndex&nbsp;!=&nbsp;-1;
		
		if&nbsp;(bExist&nbsp;&amp;&amp;&nbsp;(!sData&nbsp;&amp;&amp;&nbsp;sData&nbsp;!==&nbsp;&#39;&#39;))&nbsp;{&nbsp;//&nbsp;지워야&nbsp;하는&nbsp;상황이면
			this._wfHandler.detach(el,&nbsp;&#39;mousemove&#39;);
			
			this._aElement.splice(nIndex,&nbsp;1);
			this._aData.splice(nIndex,&nbsp;1);

			this._setFlashPosSize(0,&nbsp;0,&nbsp;1,&nbsp;1);
			return;
		}
		
		if&nbsp;(!bExist)&nbsp;{&nbsp;
			//&nbsp;새로&nbsp;만들어야&nbsp;하는&nbsp;상황
			this._wfHandler.attach(el,&nbsp;&#39;mousemove&#39;);
			this._aElement.push(el);
			this._aData.push(sData);
		}&nbsp;else&nbsp;{
			//&nbsp;바꿔야&nbsp;하는&nbsp;상황
			this._aData[nIndex]&nbsp;=&nbsp;sData;
		}
		this._setClipboard(el,&nbsp;sData);
	},
	
	_getData&nbsp;:&nbsp;function(el)&nbsp;{
		var&nbsp;nIndex&nbsp;=&nbsp;jindo.$A(this._aElement).indexOf(el);
		return&nbsp;this._aData[nIndex];
	},
	
	_setClipboard&nbsp;:&nbsp;function(el,&nbsp;sData)&nbsp;{
		var&nbsp;oFlash&nbsp;=&nbsp;this._getFlash();
		var&nbsp;sCursor&nbsp;=&nbsp;(jindo.$Element(el).css(&#39;cursor&#39;)&nbsp;||&nbsp;&#39;&#39;).toUpperCase();
		var&nbsp;bHandCursor&nbsp;=&nbsp;sCursor&nbsp;==&nbsp;&#39;POINTER&#39;&nbsp;||&nbsp;sCursor&nbsp;==&nbsp;&#39;HAND&#39;;
		
		try&nbsp;{
			oFlash.setClipboardData(sData);
			oFlash.setClipboardOptions({&nbsp;cursor&nbsp;:&nbsp;bHandCursor&nbsp;?&nbsp;&#39;pointer&#39;&nbsp;:&nbsp;&#39;default&#39;&nbsp;});
			
			this._sAppliedData&nbsp;=&nbsp;sData;
			this._bFailed&nbsp;=&nbsp;false;
		}&nbsp;catch(e)&nbsp;{
			this._bFailed&nbsp;=&nbsp;true;
		}
	},
	
	_checkFailed&nbsp;:&nbsp;function()&nbsp;{
		if&nbsp;(this._bFailed)&nbsp;{
			//&nbsp;예전에&nbsp;externalInterface&nbsp;쓸때&nbsp;실패했으면
			/**
				마우스&nbsp;클릭시&nbsp;클립보드&nbsp;설정에&nbsp;실패한&nbsp;경우&nbsp;발생
				
				@event&nbsp;failure
				@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
				@param&nbsp;{HTMLElement}&nbsp;element&nbsp;클립보드&nbsp;이벤트가&nbsp;걸린&nbsp;엘리먼트
				@param&nbsp;{Object}&nbsp;data&nbsp;클립보드에&nbsp;복사된&nbsp;마지막&nbsp;데이터
				@example
					//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
					oComponent.attach(&quot;failure&quot;,&nbsp;function(oCustomEvent){
						alert(&#39;실패&nbsp;:&nbsp;&#39;&nbsp;+&nbsp;e.element&nbsp;+&nbsp;&#39;&nbsp;를&nbsp;눌렀지만&nbsp;&#39;&nbsp;+&nbsp;e.data&nbsp;+&nbsp;&#39;&nbsp;를&nbsp;클립보드에&nbsp;저장하지&nbsp;못했습니다&#39;);
					});
			**/
			this.fireEvent(&#39;failure&#39;,&nbsp;{
				element:&nbsp;this._elOvered,
				data:&nbsp;this._lastestData
			});
		}
	},
	
	_onFlashClick&nbsp;:&nbsp;function(sData)&nbsp;{
		/**
			마우스&nbsp;클릭시&nbsp;성공적으로&nbsp;클립보드가&nbsp;설정된&nbsp;경우&nbsp;발생
			
			@event&nbsp;copy
			@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
			@param&nbsp;{HTMLElement}&nbsp;element&nbsp;클립보드&nbsp;이벤트가&nbsp;걸린&nbsp;엘리먼트
			@param&nbsp;{Object}&nbsp;data&nbsp;복사에&nbsp;성공한&nbsp;데이터
			@example
				//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
				oComponent.attach(&quot;copy&quot;,&nbsp;function(oCustomEvent){
					alert(e.element&nbsp;+&nbsp;&#39;&nbsp;를&nbsp;눌러서&nbsp;&#39;&nbsp;+&nbsp;e.data&nbsp;+&nbsp;&#39;&nbsp;가&nbsp;클립보드에&nbsp;저장되었습니다&#39;);
				});
		**/
		this.fireEvent(&#39;copy&#39;,&nbsp;{&nbsp;element&nbsp;:&nbsp;this._elOvered,&nbsp;data&nbsp;:&nbsp;sData&nbsp;});&nbsp;
	},
	_onFlashMouseOver&nbsp;:&nbsp;function()&nbsp;{&nbsp;
		/**
			클립보드&nbsp;액션이&nbsp;걸린&nbsp;엘리먼트를&nbsp;마우스&nbsp;오버했을때
			
			@event&nbsp;over
			@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
			@param&nbsp;{HTMLElement}&nbsp;element&nbsp;클립보드&nbsp;이벤트가&nbsp;걸린&nbsp;엘리먼트
			@example
				//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
				oClipboard.attach(&quot;over&quot;,&nbsp;function(oCustomEvent){&nbsp;...&nbsp;});
		**/
		this.fireEvent(&#39;over&#39;,&nbsp;{&nbsp;element&nbsp;:&nbsp;this._elOvered&nbsp;});&nbsp;
	},
	_onFlashMouseOut&nbsp;:&nbsp;function()&nbsp;{
		/**
			클립보드&nbsp;액션이&nbsp;걸린&nbsp;엘리먼트에&nbsp;마우스&nbsp;아웃&nbsp;했을때
			
			@event&nbsp;out
			@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
			@param&nbsp;{HTMLElement}&nbsp;element&nbsp;클립보드&nbsp;이벤트가&nbsp;걸린&nbsp;엘리먼트
			@example
				//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
				oClipboard.attach(&quot;out&quot;,&nbsp;function(oCustomEvent){&nbsp;...&nbsp;});
		**/
		this.fireEvent(&#39;out&#39;,&nbsp;{&nbsp;element&nbsp;:&nbsp;this._elOvered&nbsp;});&nbsp;
	},
	_onFlashMouseDown&nbsp;:&nbsp;function()&nbsp;{
		/**
			클립보드&nbsp;액션이&nbsp;걸린&nbsp;엘리먼트에&nbsp;마우스&nbsp;다운&nbsp;했을때
			
			@event&nbsp;down
			@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
			@param&nbsp;{HTMLElement}&nbsp;element&nbsp;클립보드&nbsp;이벤트가&nbsp;걸린&nbsp;엘리먼트
			@example
				//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
				oClipboard.attach(&quot;down&quot;,&nbsp;function(oCustomEvent){&nbsp;...&nbsp;});
		**/
		this.fireEvent(&#39;down&#39;,&nbsp;{&nbsp;element&nbsp;:&nbsp;this._elOvered&nbsp;});&nbsp;
	},
	_onFlashMouseUp&nbsp;:&nbsp;function()&nbsp;{
		/**
			클립보드&nbsp;액션이&nbsp;걸린&nbsp;엘리먼트에&nbsp;마우스&nbsp;업&nbsp;했을때
			
			@event&nbsp;up
			@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
			@param&nbsp;{HTMLElement}&nbsp;element&nbsp;클립보드&nbsp;이벤트가&nbsp;걸린&nbsp;엘리먼트
			@example
				//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
				oClipboard.attach(&quot;up&quot;,&nbsp;function(oCustomEvent){&nbsp;...&nbsp;});
		**/
		this.fireEvent(&#39;up&#39;,&nbsp;{&nbsp;element&nbsp;:&nbsp;this._elOvered&nbsp;});&nbsp;
	},
	_onFlashLoad&nbsp;:&nbsp;function()&nbsp;{
		/**
			클립보드&nbsp;제어를&nbsp;위한&nbsp;Flash&nbsp;파일이&nbsp;로드&nbsp;완료된&nbsp;이후에&nbsp;발생
			
			@event&nbsp;load
			@param&nbsp;{String}&nbsp;sType&nbsp;커스텀&nbsp;이벤트명
			@example
				//&nbsp;커스텀&nbsp;이벤트&nbsp;핸들링&nbsp;예제
				oComponent.attach(&quot;load&quot;,&nbsp;function(oCustomEvent){
					this.setData(jindo.$(&#39;foo&#39;),&nbsp;&#39;http://naver.com/&#39;);
					this.setData(jindo.$(&#39;bar&#39;),&nbsp;&#39;http://daum.net/&#39;);
				});
		**/
		this.fireEvent(&#39;load&#39;);&nbsp;
	}
}).extend(jindo.Component);
</pre>
		</div>
	</div>
</div>

			</div>
		</div>
		<!-- // main content -->

	</div>
	<!-- // container -->

	<!-- footer -->
	<div id="footer">
		<p>Copyright ©<a href="http://nhncorp.com/" target="_blank">NHN Corp.</a> Platform Ajax Team. All Rights Reserved.</p>
	</div>
	<!-- // footer -->

</div>
<!-- // wrap -->

<style type="text/css">

	.item {
		transition:background .2s linear;
		-webkit-transition:background .2s linear;
		-moz-transition:background .2s linear;
		-o-transition:background .2s linear;
		-ms-transition:background .2s linear;
	}
	
	.highlight {
		background-color:#ffffd8 !important;
	}
	
	li.selected a.highlight {
		background-color:#aa8 !important;
	}
	
	.hide-deprecated .deprecated-item, .hide-inherited .inherited-item, .private {
		display:none;
	}
	
	.scrollbar-v, .scrollbar-h { display:none; }
	.scrollbar-show { display:block; }
	
	.api-page .tbl_fold .more_history { display:none; }
	
	/* FILE */
	.file pre.code {
		border:1px solid #ccc;
		padding:0;
	}
	
	.file ol {
		padding-left: 4em;
		background-color: #f9f9f9;
	}

	.file ol li {
		list-style: decimal;
		border-left:1px solid #ccc;
		padding:2px 4px;
	}
	
	.file li.L1, .file li.L3, .file li.L5, .file li.L7, .file li.L9 {
		background-color: #f9f9f9;	
	}

	.file li.L0, .file li.L2, .file li.L4, .file li.L6, .file li.L8 { 
		background-color: #f0f0f0;
	}
	
</style>
<script type="text/javascript" src="../assets/prettify/prettify-min.js"></script>
<script type="text/javascript" src="../assets/hash.js"></script>
<script type="text/javascript" src="../assets/api-list.js"></script>
<script type="text/javascript" src="../assets/api-search.js"></script>
<script type="text/javascript" src="../assets/../api.js?callback=APISearch.setData"></script>
<script type="text/javascript">
	var projectRoot = "../";
	var projectAssets = "../assets";
	
    apiDocs(projectAssets);	
</script>
</body>
</html>